package cn.collin.commons.utils;

import java.util.Date;

import org.hibernate.id.UUIDHexGenerator;

/**
 * http://collincode.googlecode.com
 * 
 * @author collin.code@gmail.com
 * 
 */
public class IDGenerator {

	public static String generateByDate() {
		Date now = DateUtils.getNow();
		return DateUtils.format(now, "yyyyMMddhhmmss");
	}

	public static String generateUUID() {
		return (String) new UUIDHexGenerator().generate(null, null);
	}

}
